package com.rankeiot.core.data;

import java.io.Serializable;
import java.util.Objects;

public class Kv implements Serializable {
    private String k;
    private Object v;

    public Kv() {
    }

    public Kv(String k, Object v) {
        this.k = k;
        this.v = v;
    }

    public String getK() {
        return k;
    }

    public void setK(String k) {
        this.k = k;
    }

    public Object getV() {
        return v;
    }

    public void setV(Object v) {
        this.v = v;
    }

    @Override
    public String toString() {
        return '{' + k +':'+v+'}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Kv kv = (Kv) o;
        return Objects.equals(k, kv.k) && Objects.equals(v, kv.v);
    }

    @Override
    public int hashCode() {
        return Objects.hash(k, v);
    }
}
